<div id="control">
	<a href="{Url::anchor("admin/{Input::get(1)}")}" class="item small text"><img src="/styles/admin/gfx/icons/small/cancel.png" alt="Đóng"/><span>Đóng</span></a>
</div>

<div class="section">
	<div class="box">
		<div class="title">
			Thêm/Chỉnh sửa thành viên
			<span class="hide"></span>
		</div>
		<div class="content">
			<form action="{Url::current()}" method="post">
				<div class="row">
					<label>Tên *</label>
					<div class="right"><input type="text" name="txtName" value="{if isset($members)}{$members.name}{/if}" maxlength="100" placeholder="Max. 100 characters..." /></div>
				</div>
                <div class="row">
					<label>Địa chỉ </label>
					<div class="right"><input type="text" name="txtAdd" value="{if isset($members)}{$members.address}{/if}" /></div>
				</div>
                <div class="row">
                    <label>Ngày sinh</label>
                    <div class="right"><input type="text" class="datepicker" name="txtBirth" value="{if isset($members)}{date('m.d.Y',strtotime($members.birthday))}{/if}" placeholder="mm.dd.yyyy" />&nbsp;(mm.dd.yyyy)</div>
                </div>
                <div class="row">
					<label>Giới tính</label>
					<div class="right">
						<select name="chkSex">
                            <option value="1" {if isset($members.sex)&& $members.sex eq 1} selected="" {/if}>Nam</option>
							<option value="0" {if isset($members.sex)&& $members.sex eq 0} selected="" {/if}>Nữ</option>
                            <option value="-1" {if isset($members.sex)&& $members.sex eq -1} selected="" {/if}>Chưa xác định</option>										
						</select>
					</div>
				</div>
                <div class="row">
					<label>Điện thoại </label>
					<div class="right"><input type="text" name="txtPhone" value="{if isset($members)}{$members.phone}{/if}" /></div>
				</div>
                <div class="row">
					<label>Email </label>
					<div class="right"><input type="text" name="txtEmail" value="{if isset($members)}{$members.email}{/if}" /></div>
				</div>
                <div class="row">
					<label>Username *</label>
					<div class="right"><input type="text" name="txtUser" value="{if isset($members)}{$members.username}{/if}" maxlength="30" placeholder="Max. 30 characters..." /></div>
				</div>
                <div class="row">
					<label>Password *</label>
					<div class="right"><input type="password" name="txtPass" value="" /></div>
				</div>
                <div class="row">
					<label>Active</label>
					<div class="right">
						<select name="chkActive">
                            <option value="1" {if isset($members.active)&& $members.active eq 1} selected="" {/if}>Đã Active</option>
							<option value="0" {if isset($members.active)&& $members.active eq 0} selected="" {/if}>Chưa Active</option>										
						</select>
					</div>
				</div>
                <div class="row">
					<div class="right">
                        <input type="hidden" name="token" value="{Security::setToken('token_form')}" />
						<input type="hidden" name="action" value="{$action}" />
						<button type="submit"><span>Save</span></button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>